package com.orange.utils;

import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

public class ReadPropertiesUtils {
	
	private static Logger logger = Logger.getLogger(ReadPropertiesUtils.class);


	/**
	 * @Description: 读取*.properties文档 
	 * @param propertiesName
	 * @return
	 */
    public static Properties readPropertie(String propertiesName) {
    	Properties fileProperties = new Properties();
    	logger.info("开始读取配置文件:"+propertiesName );
        InputStream loadFile = ReadPropertiesUtils.class.getClassLoader()
                .getResourceAsStream(propertiesName);
        try {
            fileProperties.load(loadFile);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return fileProperties;
    }
    
}
